using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Utils.Collections;
using System.Diagnostics;

namespace Utils.App
{
    abstract public class GameObject
    {
        protected bool dead = false;
        protected int references;

        public bool Dead { get { return dead; } set { dead = value; } }
        public int References { get { return references; } set { references = value; } }

        public virtual void Update(float dTime) { }

        public virtual void IncRef()
        {
            references++;
        }

        public virtual void DecRef()
        {
            Debug.Assert(references != 0, "DecRef when not referenced");
            references--;
        }
    }
}
